﻿@model PagedList.IPagedList<TGBTech.Core.Models.Models.BaoCao.SoChiTietThanhToanKHModel.SoChiTietThanhToanKHModel>
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
<table class="table">
    <tr>
        <th>Số hiệu CT</th>
        <th>Ngày CT</th>
        <th>Diễn Giải</th>
        <th>TK Đối Ứng</th>
        <th>Nợ Phát sinh</th>
        <th>Có Phát sinh</th>
        <th>Nợ cuối kỳ</th>
        <th>Có cuối kỳ</th>
    </tr>


    @if (Model != null)
    {
        foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.SoCT)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NgayThangCT)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DienGiaiCT)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.TKDU)
                </td>
                <td>
                    @if (!item.IsCo)
                    {
                        @Html.DisplayFor(modelItem => item.NoPhatSinh);
                    }
                    else
                    {
                        <p>--</p>
                    }
                </td>
                <td>
                    @if (item.IsCo)
                    {
                        @Html.DisplayFor(modelItem => item.CoPhatSinh);
                    }
                    else
                    {
                        <p>--</p>
                    }
                </td>
            </tr>
        }
    }

</table>
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount

@Html.PagedListPager(Model, page => Url.Action("Create",
    new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }))



